package dao;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

@Entity
@NamedQueries({
	@NamedQuery(name="searchFederationCode",query=" from Federation f where f.cdFederation = :code"),
	@NamedQuery(name="searchFederationName",query=" from Federation f where f.nmFederation like :name"),
	@NamedQuery(name="searchAllFederation",query=" from Federation f order by f.nmFederation ASC")	
})
public class Federation {
	@Id
	@GeneratedValue
	private int OID;
	private String cdFederation;
	private String nmFederation;
		
	public int getOID() {
		return OID;
	}
	public void setOID(int oID) {
		OID = oID;
	}
	public String getCdFederation() {
		return cdFederation;
	}
	public void setCdFederation(String cdFederation) {
		this.cdFederation = cdFederation;
	}
	public String getNmFederation() {
		return nmFederation;
	}
	public void setNmFederation(String nmFederation) {
		this.nmFederation = nmFederation;
	}
	
	public String toString(){
		return cdFederation + " - " + this.nmFederation;
	}

}
